import changeData from 'utils/changeData.js'
export const formList = [{
		label: '人像',
		prop: 'portraitUrl',
		type: 'image',
		rules: [{
			required: true,
			message: '请上传人像',
			trigger: ['change', 'blur']
		}],
	},
	{
		label: '姓名',
		prop: 'name',
		type: 'text',
		placeholder: '请输入姓名',
		rules: [{
			required: true,
			message: '请输入姓名',
			trigger: ['change', 'blur'],
		}],
	},
	{
		label: '性别',
		prop: 'sex',
		type: 'popup',
		placeholder: '请选择性别',
		rules: [{
			required: true,
			message: '请选择性别',
			trigger: ['change', 'blur'],
			transform(value) {
				return String(value);
			}
		}],
		columns: [{
			name: '男',
			value: 1
		}, {
			name: '女',
			value: 2
		}]
	},
	{
		label: '出生日期',
		prop: 'birth',
		type: 'datetime',
		placeholder: '请选择出生日期',
		mode: 'date',
		rules: [{
			required: true,
			message: '请选择出生日期',
			trigger: ['change', 'blur'],
			transform(value) {
				return String(value);
			}
		}],
		format: 'YYYY-MM-DD'
	},
	{
		label: '年龄',
		prop: 'age',
		type: 'text',
		placeholder: '请先选择出生日期',
		disabled: true,
		rules: [{
			required: true,
			message: '请输入年龄',
			trigger: ['change', 'blur'],
			transform(value) {
				return String(value);
			}
		}],
	},
	{
		label: '名族（选填）',
		prop: 'nationals',
		type: 'popup',
		code: 'national',
		placeholder: '请选择名族',
		columns: []
	},
	{
		label: '联系电话',
		prop: 'phone',
		type: 'text',
		placeholder: '请输入联系电话',
		rules: [{
			required: true,
			message: '请输入联系电话',
			pattern: changeData.phonePattern,
			trigger: ['change', 'blur']
		}]
	},
];
export const formList1 = [{
		label: '证件类型',
		prop: 'cardType',
		type: 'popup',
		code: 'card_type',
		placeholder: '请选择证件类型',
		rules: [{
			required: true,
			message: '请选择证件类型',
			trigger: ['change', 'blur'],
			transform(value) {
				return String(value);
			}
		}],
		columns: []
	},
	{
		label: '证件号码',
		prop: 'card',
		type: 'text',
		disabled: true,
		placeholder: '请先选择证件类型',
		rules: [{
			required: true,
			message: '请输入证件号码',
			trigger: ['change', 'blur'],
			transform(value) {
				return String(value);
			},
			validator: changeData.cardRouls
		}]
	}
];
export const formList2 = [{
		label: '职业',
		prop: 'occupation',
		type: 'text',
		code: 'occupational_type',
		placeholder: '请输入职业'
	},
	{
		label: '职业类型',
		prop: 'occupationType',
		type: 'popup',
		code: 'occupational_type',
		placeholder: '请选择职业类型',
		columns: []
	}
];
export const formList3 = [{
		label: '实有人口地(住)址登记类型',
		prop: 'registrationType',
		type: 'popup',
		placeholder: '请选择登记类型',
		rules: [{
			required: true,
			message: '请选择实有人口地(住)址登记类型',
			trigger: ['change', 'blur']
		}],
		columns: [
		]
	},
	{
		label: '人户一致',
		prop: 'consistencyIndividuals',
		type: 'popup',
		placeholder: '请选择人户一致',
		rules: [{
			required: true,
			message: '请选择',
			trigger: ['change', 'blur']
		}],
		columns: [{
				name: '是',
				value: '1'
			},
			{
				name: '否',
				value: '2'
			}
		]
	}
];
export const formList4 = [{
		label: '所在地区',
		prop: 'registeredResidence',
		type: 'picker',
		placeholder: '请选择所在地区'
	},
	{
		label: '详细地址',
		prop: 'residencePlace',
		type: 'textarea',

		placeholder: '请输入详细地址'
	}
];
export const formList5 = [{
		label: '所在地区',
		prop: 'actualProvince',
		type: 'picker',
		placeholder: '请选择所在地区',
		rules: [{
			required: true,
			message: '请选择所在地区',
			trigger: ['change']
		}]
	},
	{
		label: '详细地址',
		prop: 'actualPlace',
		type: 'textarea',
		rules: [{
			required: true,
			message: '请输入详细地址',
			trigger: ['change', 'blur']
		}],
		placeholder: '请输入详细地址'
	},
	{
		label: '未落户原因(选填)',
		prop: 'reason',
		type: 'textarea',
		placeholder: '请输入未落户原因'
	}
];